package com.miku.blog.controller;

import com.miku.blog.annotation.SystemLog;
import com.miku.blog.domain.UserAuth;
import com.miku.blog.domain.pojo.ResponseResult;
import com.miku.blog.service.LoginService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author shkstart
 * @create ${}YEAR-06-14 17:29
 */
@Api(tags = "登录")
@RestController
public class LoginController {

    @Autowired
    private LoginService loginService;

    @SystemLog(notes = "用户登录")
    @ApiOperation(value = "用户登录接口",notes = "提交form表单数据 { 参数 :  username , password }")
    @PostMapping("/login")
    public ResponseResult login(UserAuth userAuth){
        return loginService.login(userAuth);
    }


}
